<?php
class LuminousGrammarCSharp extends LuminousGrammar
{
  public $keywords = array("abstract", "event", "new", "struct", "as", 
    "explicit", "null", "switch", "base", "extern", "object", "this", "false", 
    "operator", "throw", "break", "finally", "out", "true","fixed", "override", 
    "try", "case", "params", "typeof", "catch", "for", "private", "foreach", 
    "protected", "checked", "goto", "public", "unchecked", "class", "if", 
    "readonly", "unsafe", "implicit", "ref", "continue", "in", "return", 
    "using", "decimal", "virtual", "default", "interface", "sealed", "volatile",
    "delegate", "internal", "void", "do", "is", "sizeof", "while", "lock", 
    "stackalloc", "else", "long", "static", "enum", "namespace");
  
  public $types = array("bool", "byte", "char", "const", "double", "float", "int",
  "long", "sbyte", "short", "uint", "ulong", "ushort", "string",
  // system namespace
  "Array", "Attribute", "Byte", "Buffer", "Char", "DateTime", "Double", "EventArgs",
  "EventHandler", "Exception", "U?Int(?:16|32|64|Ptr)", "Object", "String", "Tuple",
  "Type",
  // system.collection namespace
  "ArrayList", "I?Comparer", "I?Dictionary", "Hashtable", "Hashset", "I?List", 
  "I?Set", "Queue", "SortedList", "Stack",
  
  //System.IO
  "Binary(?:Reader|Writer)", "BufferedStream", 
  "Directory(?:Info|NotFoundException)?", "Drive(?:Info|NotFoundException)?", 
  "EndOfStreamException", "ErrorEvent(?:Args|Handler)", 
  "File(?:Access|Attributes|FormatException|Info|LoadException|Mode|NotFoundException|Options|Share|Stream|SystemEventArgs|SystemEventHandler|SystemInfo|SystemWatcher)?", 
  "HandleInheritability", "InternalBufferOverflowException", 
  "InvalidDataException", "IODescriptionAttribute", "IOException", 
  "MemoryStream", "NotifyFilters", "Path(?:TooLongException)?", 
  "PipeException", "RenamedEventArgs", "RenamedEventHandler", "SearchOption", 
  "SeekOrigin", "Stream(?:Reader|Writer)?", "String(?:Reader|Writer)", 
  "Text(?:Reader|Writer)", "UnmanagedMemory(?:Accessor|Stream)", 
  "WaitForChangedResult", "WatcherChangeTypes",
  
  // module things
  "System(?:[\w\.]*)?",
  "Accessibility",
  "Microsoft(?:[\w\.]*)?",
  "UIAutomationClientsideProviders",
  "XamlGeneratedNamespace"
  );
  
  public $functions = array("get", "set");
  
  public $oo_separators = array('\.');
  
  function __construct()
  {
    
    
    $this->SetInfoAuthor( 
      array('name'=>'Mark Watkinson', 'email'=>'markwatkinson@gmail.com',
      'website'=>'http://www.asgaard.co.uk'));
    $this->SetInfoLanguage('cs');
    $this->SetInfoVersion('0.5.4');    
    
    
    $this->delimited_types = array(
      new LuminousDelimiterRule(0, 'PREPROCESSOR', LUMINOUS_REGEX|LUMINOUS_COMPLETE,
      '/#.*?[^\\\](\\\\)*$/sm'),
      luminous_generic_doc_comment('/**', '*/'),
      luminous_generic_doc_comment('/*!', '*/'),
      luminous_generic_doc_comment('//!', "\n"),
      luminous_generic_doc_comment('///', "\n"),
      
      luminous_generic_comment('/*', '*/'),
      luminous_generic_comment('//', "\n"),
      luminous_generic_string('"', '"'),
      
      new LuminousDelimiterRule(0, 'CHARACTER', 0, '\'', '\'',
      'luminous_type_callback_cstring'),
    );
    
    $this->SetSimpleTypeRules();
    $this->simple_types[] = luminous_generic_constant();
    
  }

}